﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using WeShare.WeiXin.Common;
using WeShare.WeiXin.Common.EnumKey;
using WeShare.WeiXin.Mp.Card;
using WeShare.WeiXin.Mp.QrCode;
using WeShare.WeiXin.Applet.Qr;
using System.Threading;
using System.Web;
using WeShare.WeiXin.Mp.GroupSend;
using WeShare.WeiXin.Mp.TemplateNotice;

namespace WebApp.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class ValuesController : ControllerBase
    {
        private string rootpath;
        public ValuesController(IHostingEnvironment evt)
        {
          var url =   TemplateNoticeApi.GetSubscribeMsgUrl(30, "n4nYQLlHnJhHK7Iz7a7WrjnIhOOnFIps1wTBk2manzM",HttpUtility.UrlEncode("http://soeasy.51vip.biz/index.html"), "", "wx891ee9903ba8d74e");
            rootpath = evt.WebRootPath;
        }
        // GET api/values/5
        [HttpGet("{id}")]
        public async Task<string> Get(int id)
        {
            return await OpenApi.GetTokenAsync();
        }

        // POST api/values
        [HttpPost]
        public void Post([FromBody] string value)
        {

        }

        // PUT api/values/5
        [HttpPut("{id}")]
        public void Put(int id, [FromBody] string value)
        {
        }

        // DELETE api/values/5
        [HttpDelete("{id}")]
        public void Delete(int id)
        {

        }
    }
}
